/*
 * @Author: Yxliam
 * @Date: 2023-12-12 17:13:51
 * @LastEditors: Yxliam
 * @LastEditTime: 2023-12-14 16:28:40
 * @Description: 
 */
import * as React from 'react';
import {
  createBottomTabNavigator,
  BottomTabBarProps,
} from '@react-navigation/bottom-tabs';
// import {HomeOutline} from '@fruits-chain/icons-react-native';
import {TransitionPresets} from '@react-navigation/stack';
import {Text, View, StyleSheet, TouchableOpacity, Image} from 'react-native';
import {activeColor} from '../../common/color';
import styles from './styles';
import LinearGradinet from 'react-native-linear-gradient';
import Ionicons from 'react-native-vector-icons/Ionicons';
import {p} from '../../utils/pxToDp';
import icon1 from '../../assets/2x2.png';

const MyHome = () => {
  const Navs = [
    {
      title: '商城',
      tip: 'Shopping Center',
      icon: 'home-sharp',
    },
    {
      title: '核销码',
      tip: 'Verification QR Code',
      icon: 'qr-code',
    },
    {
      title: '扫一扫',
      tip: 'Scan The Code',
      icon: 'scan',
    },
  ];

  return (
    <View>
      <View>
        <Image
          style={styles.banner}
          source={{
            uri: 'https://act-res.singworld.cn/Fsw52QHf6PLCC_Ldf3C6-B5oUIeD',
          }}
        />
      </View>
      <View style={styles.wrapper}>
        <View style={styles.navbox}>
          <LinearGradinet
            colors={['#FF9549', '#FFA565']}
            style={styles.navleft}>
            <Text style={styles.navlefttext}>购币</Text>
            <Image style={styles.navleftimg} source={{
              uri: 'https://ecktv-h5-pre.singworld.cn/assets/cnxk-taro3-new/home-b1.png',
            }} />
          </LinearGradinet>
          <View>
            {Navs.map((item, index) => {
              return (
                <LinearGradinet
                  colors={['#FF9549', '#FFA565']}
                  key={index}
                  style={[
                    styles.navrightitem,
                    index !== 2 ? styles.navmarginbottom : null,
                  ]}>
                  <View style={styles.navinner}>
                    <View>
                      <Text style={styles.navrightitemtext}>{item.title}</Text>
                      <Text style={styles.navrightitemsmall}>{item.tip}</Text>
                    </View>
                    <View>
                      <Ionicons name={item.icon} size={35} color={'black'} />
                    </View>
                  </View>
                </LinearGradinet>
              );
            })}
          </View>
        </View>
      </View>
    </View>
  );
};

export default MyHome;
